3.1139 \(\int \frac{A+B x}{(a+b x)^3 (d+e x)} \, dx\)

Optimal. Leaf size=113 \[ -\frac{A b-a B}{2 b (a+b x)^2 (b d-a e)}-\frac{B d-A e}{(a+b x) (b d-a e)^2}-\frac{e \log (a+b x) (B d-A e)}{(b d-a e)^3}+\frac{e (B d-A e) \log (d+e x)}{(b d-a e)^3} \]

[Out]

-(A*b - a*B)/(2*b*(b*d - a*e)*(a + b*x)^2) - (B*d - A*e)/((b*d - a*e)^2*(a + b*x)) - (e*(B*d - A*e)*Log[a + b*
x])/(b*d - a*e)^3 + (e*(B*d - A*e)*Log[d + e*x])/(b*d - a*e)^3

________________________________________________________________________________________

Rubi [A]  time = 0.0916297, antiderivative size = 113, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.05, Rules used = {77} \[ -\frac{A b-a B}{2 b (a+b x)^2 (b d-a e)}-\frac{B d-A e}{(a+b x) (b d-a e)^2}-\frac{e \log (a+b x) (B d-A e)}{(b d-a e)^3}+\frac{e (B d-A e) \log (d+e x)}{(b d-a e)^3} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/((a + b*x)^3*(d + e*x)),x]

[Out]

-(A*b - a*B)/(2*b*(b*d - a*e)*(a + b*x)^2) - (B*d - A*e)/((b*d - a*e)^2*(a + b*x)) - (e*(B*d - A*e)*Log[a + b*
x])/(b*d - a*e)^3 + (e*(B*d - A*e)*Log[d + e*x])/(b*d - a*e)^3

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin{align*} \int \frac{A+B x}{(a+b x)^3 (d+e x)} \, dx &=\int \left (\frac{A b-a B}{(b d-a e) (a+b x)^3}+\frac{b (B d-A e)}{(b d-a e)^2 (a+b x)^2}+\frac{b e (-B d+A e)}{(b d-a e)^3 (a+b x)}-\frac{e^2 (-B d+A e)}{(b d-a e)^3 (d+e x)}\right ) \, dx\\ &=-\frac{A b-a B}{2 b (b d-a e) (a+b x)^2}-\frac{B d-A e}{(b d-a e)^2 (a+b x)}-\frac{e (B d-A e) \log (a+b x)}{(b d-a e)^3}+\frac{e (B d-A e) \log (d+e x)}{(b d-a e)^3}\\ \end{align*}

Mathematica [A]  time = 0.0684513, size = 103, normalized size = 0.91 \[ \frac{\frac{(a B-A b) (b d-a e)^2}{b (a+b x)^2}+\frac{2 (b d-a e) (A e-B d)}{a+b x}+2 e \log (a+b x) (A e-B d)+2 e (B d-A e) \log (d+e x)}{2 (b d-a e)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/((a + b*x)^3*(d + e*x)),x]

[Out]

(((-(A*b) + a*B)*(b*d - a*e)^2)/(b*(a + b*x)^2) + (2*(b*d - a*e)*(-(B*d) + A*e))/(a + b*x) + 2*e*(-(B*d) + A*e
)*Log[a + b*x] + 2*e*(B*d - A*e)*Log[d + e*x])/(2*(b*d - a*e)^3)

________________________________________________________________________________________

Maple [A]  time = 0.009, size = 171, normalized size = 1.5 \begin{align*}{\frac{{e}^{2}\ln \left ( ex+d \right ) A}{ \left ( ae-bd \right ) ^{3}}}-{\frac{e\ln \left ( ex+d \right ) Bd}{ \left ( ae-bd \right ) ^{3}}}+{\frac{A}{ \left ( 2\,ae-2\,bd \right ) \left ( bx+a \right ) ^{2}}}-{\frac{Ba}{ \left ( 2\,ae-2\,bd \right ) b \left ( bx+a \right ) ^{2}}}+{\frac{Ae}{ \left ( ae-bd \right ) ^{2} \left ( bx+a \right ) }}-{\frac{Bd}{ \left ( ae-bd \right ) ^{2} \left ( bx+a \right ) }}-{\frac{{e}^{2}\ln \left ( bx+a \right ) A}{ \left ( ae-bd \right ) ^{3}}}+{\frac{e\ln \left ( bx+a \right ) Bd}{ \left ( ae-bd \right ) ^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/(b*x+a)^3/(e*x+d),x)

[Out]

e^2/(a*e-b*d)^3*ln(e*x+d)*A-e/(a*e-b*d)^3*ln(e*x+d)*B*d+1/2/(a*e-b*d)/(b*x+a)^2*A-1/2/(a*e-b*d)/b/(b*x+a)^2*B*
a+1/(a*e-b*d)^2/(b*x+a)*A*e-1/(a*e-b*d)^2/(b*x+a)*B*d-e^2/(a*e-b*d)^3*ln(b*x+a)*A+e/(a*e-b*d)^3*ln(b*x+a)*B*d

________________________________________________________________________________________

Maxima [B]  time = 1.25431, size = 340, normalized size = 3.01 \begin{align*} -\frac{{\left (B d e - A e^{2}\right )} \log \left (b x + a\right )}{b^{3} d^{3} - 3 \, a b^{2} d^{2} e + 3 \, a^{2} b d e^{2} - a^{3} e^{3}} + \frac{{\left (B d e - A e^{2}\right )} \log \left (e x + d\right )}{b^{3} d^{3} - 3 \, a b^{2} d^{2} e + 3 \, a^{2} b d e^{2} - a^{3} e^{3}} - \frac{{\left (B a b + A b^{2}\right )} d +{\left (B a^{2} - 3 \, A a b\right )} e + 2 \,{\left (B b^{2} d - A b^{2} e\right )} x}{2 \,{\left (a^{2} b^{3} d^{2} - 2 \, a^{3} b^{2} d e + a^{4} b e^{2} +{\left (b^{5} d^{2} - 2 \, a b^{4} d e + a^{2} b^{3} e^{2}\right )} x^{2} + 2 \,{\left (a b^{4} d^{2} - 2 \, a^{2} b^{3} d e + a^{3} b^{2} e^{2}\right )} x\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a)^3/(e*x+d),x, algorithm="maxima")

[Out]

-(B*d*e - A*e^2)*log(b*x + a)/(b^3*d^3 - 3*a*b^2*d^2*e + 3*a^2*b*d*e^2 - a^3*e^3) + (B*d*e - A*e^2)*log(e*x +
d)/(b^3*d^3 - 3*a*b^2*d^2*e + 3*a^2*b*d*e^2 - a^3*e^3) - 1/2*((B*a*b + A*b^2)*d + (B*a^2 - 3*A*a*b)*e + 2*(B*b
^2*d - A*b^2*e)*x)/(a^2*b^3*d^2 - 2*a^3*b^2*d*e + a^4*b*e^2 + (b^5*d^2 - 2*a*b^4*d*e + a^2*b^3*e^2)*x^2 + 2*(a
*b^4*d^2 - 2*a^2*b^3*d*e + a^3*b^2*e^2)*x)

________________________________________________________________________________________

Fricas [B]  time = 1.56181, size = 728, normalized size = 6.44 \begin{align*} \frac{4 \, A a b^{2} d e -{\left (B a b^{2} + A b^{3}\right )} d^{2} +{\left (B a^{3} - 3 \, A a^{2} b\right )} e^{2} - 2 \,{\left (B b^{3} d^{2} + A a b^{2} e^{2} -{\left (B a b^{2} + A b^{3}\right )} d e\right )} x - 2 \,{\left (B a^{2} b d e - A a^{2} b e^{2} +{\left (B b^{3} d e - A b^{3} e^{2}\right )} x^{2} + 2 \,{\left (B a b^{2} d e - A a b^{2} e^{2}\right )} x\right )} \log \left (b x + a\right ) + 2 \,{\left (B a^{2} b d e - A a^{2} b e^{2} +{\left (B b^{3} d e - A b^{3} e^{2}\right )} x^{2} + 2 \,{\left (B a b^{2} d e - A a b^{2} e^{2}\right )} x\right )} \log \left (e x + d\right )}{2 \,{\left (a^{2} b^{4} d^{3} - 3 \, a^{3} b^{3} d^{2} e + 3 \, a^{4} b^{2} d e^{2} - a^{5} b e^{3} +{\left (b^{6} d^{3} - 3 \, a b^{5} d^{2} e + 3 \, a^{2} b^{4} d e^{2} - a^{3} b^{3} e^{3}\right )} x^{2} + 2 \,{\left (a b^{5} d^{3} - 3 \, a^{2} b^{4} d^{2} e + 3 \, a^{3} b^{3} d e^{2} - a^{4} b^{2} e^{3}\right )} x\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a)^3/(e*x+d),x, algorithm="fricas")

[Out]

1/2*(4*A*a*b^2*d*e - (B*a*b^2 + A*b^3)*d^2 + (B*a^3 - 3*A*a^2*b)*e^2 - 2*(B*b^3*d^2 + A*a*b^2*e^2 - (B*a*b^2 +
 A*b^3)*d*e)*x - 2*(B*a^2*b*d*e - A*a^2*b*e^2 + (B*b^3*d*e - A*b^3*e^2)*x^2 + 2*(B*a*b^2*d*e - A*a*b^2*e^2)*x)
*log(b*x + a) + 2*(B*a^2*b*d*e - A*a^2*b*e^2 + (B*b^3*d*e - A*b^3*e^2)*x^2 + 2*(B*a*b^2*d*e - A*a*b^2*e^2)*x)*
log(e*x + d))/(a^2*b^4*d^3 - 3*a^3*b^3*d^2*e + 3*a^4*b^2*d*e^2 - a^5*b*e^3 + (b^6*d^3 - 3*a*b^5*d^2*e + 3*a^2*
b^4*d*e^2 - a^3*b^3*e^3)*x^2 + 2*(a*b^5*d^3 - 3*a^2*b^4*d^2*e + 3*a^3*b^3*d*e^2 - a^4*b^2*e^3)*x)

________________________________________________________________________________________

Sympy [B]  time = 2.27423, size = 558, normalized size = 4.94 \begin{align*} - \frac{e \left (- A e + B d\right ) \log{\left (x + \frac{- A a e^{3} - A b d e^{2} + B a d e^{2} + B b d^{2} e - \frac{a^{4} e^{5} \left (- A e + B d\right )}{\left (a e - b d\right )^{3}} + \frac{4 a^{3} b d e^{4} \left (- A e + B d\right )}{\left (a e - b d\right )^{3}} - \frac{6 a^{2} b^{2} d^{2} e^{3} \left (- A e + B d\right )}{\left (a e - b d\right )^{3}} + \frac{4 a b^{3} d^{3} e^{2} \left (- A e + B d\right )}{\left (a e - b d\right )^{3}} - \frac{b^{4} d^{4} e \left (- A e + B d\right )}{\left (a e - b d\right )^{3}}}{- 2 A b e^{3} + 2 B b d e^{2}} \right )}}{\left (a e - b d\right )^{3}} + \frac{e \left (- A e + B d\right ) \log{\left (x + \frac{- A a e^{3} - A b d e^{2} + B a d e^{2} + B b d^{2} e + \frac{a^{4} e^{5} \left (- A e + B d\right )}{\left (a e - b d\right )^{3}} - \frac{4 a^{3} b d e^{4} \left (- A e + B d\right )}{\left (a e - b d\right )^{3}} + \frac{6 a^{2} b^{2} d^{2} e^{3} \left (- A e + B d\right )}{\left (a e - b d\right )^{3}} - \frac{4 a b^{3} d^{3} e^{2} \left (- A e + B d\right )}{\left (a e - b d\right )^{3}} + \frac{b^{4} d^{4} e \left (- A e + B d\right )}{\left (a e - b d\right )^{3}}}{- 2 A b e^{3} + 2 B b d e^{2}} \right )}}{\left (a e - b d\right )^{3}} - \frac{- 3 A a b e + A b^{2} d + B a^{2} e + B a b d + x \left (- 2 A b^{2} e + 2 B b^{2} d\right )}{2 a^{4} b e^{2} - 4 a^{3} b^{2} d e + 2 a^{2} b^{3} d^{2} + x^{2} \left (2 a^{2} b^{3} e^{2} - 4 a b^{4} d e + 2 b^{5} d^{2}\right ) + x \left (4 a^{3} b^{2} e^{2} - 8 a^{2} b^{3} d e + 4 a b^{4} d^{2}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a)**3/(e*x+d),x)

[Out]

-e*(-A*e + B*d)*log(x + (-A*a*e**3 - A*b*d*e**2 + B*a*d*e**2 + B*b*d**2*e - a**4*e**5*(-A*e + B*d)/(a*e - b*d)
**3 + 4*a**3*b*d*e**4*(-A*e + B*d)/(a*e - b*d)**3 - 6*a**2*b**2*d**2*e**3*(-A*e + B*d)/(a*e - b*d)**3 + 4*a*b*
*3*d**3*e**2*(-A*e + B*d)/(a*e - b*d)**3 - b**4*d**4*e*(-A*e + B*d)/(a*e - b*d)**3)/(-2*A*b*e**3 + 2*B*b*d*e**
2))/(a*e - b*d)**3 + e*(-A*e + B*d)*log(x + (-A*a*e**3 - A*b*d*e**2 + B*a*d*e**2 + B*b*d**2*e + a**4*e**5*(-A*
e + B*d)/(a*e - b*d)**3 - 4*a**3*b*d*e**4*(-A*e + B*d)/(a*e - b*d)**3 + 6*a**2*b**2*d**2*e**3*(-A*e + B*d)/(a*
e - b*d)**3 - 4*a*b**3*d**3*e**2*(-A*e + B*d)/(a*e - b*d)**3 + b**4*d**4*e*(-A*e + B*d)/(a*e - b*d)**3)/(-2*A*
b*e**3 + 2*B*b*d*e**2))/(a*e - b*d)**3 - (-3*A*a*b*e + A*b**2*d + B*a**2*e + B*a*b*d + x*(-2*A*b**2*e + 2*B*b*
*2*d))/(2*a**4*b*e**2 - 4*a**3*b**2*d*e + 2*a**2*b**3*d**2 + x**2*(2*a**2*b**3*e**2 - 4*a*b**4*d*e + 2*b**5*d*
*2) + x*(4*a**3*b**2*e**2 - 8*a**2*b**3*d*e + 4*a*b**4*d**2))

________________________________________________________________________________________

Giac [B]  time = 2.1967, size = 309, normalized size = 2.73 \begin{align*} -\frac{{\left (B b d e - A b e^{2}\right )} \log \left ({\left | b x + a \right |}\right )}{b^{4} d^{3} - 3 \, a b^{3} d^{2} e + 3 \, a^{2} b^{2} d e^{2} - a^{3} b e^{3}} + \frac{{\left (B d e^{2} - A e^{3}\right )} \log \left ({\left | x e + d \right |}\right )}{b^{3} d^{3} e - 3 \, a b^{2} d^{2} e^{2} + 3 \, a^{2} b d e^{3} - a^{3} e^{4}} - \frac{B a b^{2} d^{2} + A b^{3} d^{2} - 4 \, A a b^{2} d e - B a^{3} e^{2} + 3 \, A a^{2} b e^{2} + 2 \,{\left (B b^{3} d^{2} - B a b^{2} d e - A b^{3} d e + A a b^{2} e^{2}\right )} x}{2 \,{\left (b d - a e\right )}^{3}{\left (b x + a\right )}^{2} b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a)^3/(e*x+d),x, algorithm="giac")

[Out]

-(B*b*d*e - A*b*e^2)*log(abs(b*x + a))/(b^4*d^3 - 3*a*b^3*d^2*e + 3*a^2*b^2*d*e^2 - a^3*b*e^3) + (B*d*e^2 - A*
e^3)*log(abs(x*e + d))/(b^3*d^3*e - 3*a*b^2*d^2*e^2 + 3*a^2*b*d*e^3 - a^3*e^4) - 1/2*(B*a*b^2*d^2 + A*b^3*d^2
- 4*A*a*b^2*d*e - B*a^3*e^2 + 3*A*a^2*b*e^2 + 2*(B*b^3*d^2 - B*a*b^2*d*e - A*b^3*d*e + A*a*b^2*e^2)*x)/((b*d -
 a*e)^3*(b*x + a)^2*b)